package cn.gzsf.csmall.passport.pojo.param;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@Accessors(chain = true)
public class AdminAddNewParam implements Serializable {
    @NotNull(message = "必须提交用户名")
    @ApiModelProperty(value = "用户名",required = true,position = 1,example = "test-user-001")
    private String username;

    @NotNull(message = "必须提交密码")
    @ApiModelProperty(value = "密码",required = true,position = 2,example = "123456")
    private String password;

    @NotNull(message = "必须提交昵称")
    @ApiModelProperty(value = "昵称",required = true,position = 3,example = "测试管理员001")
    private String nickname;

    @NotNull(message = "必须提交头像")
    @ApiModelProperty(value = "头像",required = true,position =4,example = "https://img2.baidu.com/it/u=4244269751,4000533845&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500")
    private String avatar;

    @NotNull(message = "必须提交手机号码")
    @ApiModelProperty(value = "手机号码",required = true,position = 5,example = "17585434355")
    private String phone;

    @NotNull(message = "必须提交邮箱")
    @ApiModelProperty(value = "邮箱",required = true,position = 6,example = "17585434355")
    private String email;

    @NotNull(message = "必须提交简介")
    @ApiModelProperty(value = "简介",required = true,position = 7,example = "xxxx")
    private String description;

    @NotNull(message = "必须提交是否启用")
    @Range(min = 0,max = 2,message = "排序序号值必须在0~1之间")
    @ApiModelProperty(value = "是否启用，必须是0~1之间的数字",required = true,position = 8,example = "1")
    private Integer enable;
    /**接收新增管理员角色Id*/
    private Long[] roleIds;


}
